<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>手写事件总线</title>
</head>
<body>

<script src="../lib/JustMicrobundle.umd.js"></script>
<script>
    const {eventBus} = JustMicrobundle
    eventBus.on('add', (data) => {
        console.log('add', data)
    })
    eventBus.on('add', (data) => {
        console.log('add2', data)
    })
    eventBus.on('delete', (data) => {
        console.log('delete', data)
    })

    // eventBus.off('add')
    // eventBus.off()

    eventBus.emit('add', 123)
    eventBus.emit('delete', 'abc')

</script>
</body>
</html>
